package com.chaopei.myobj;

/**
 * @Author Corday 天涯
 * @Date 2022/3/4 11:31
 */
public class User {//用户类
    String username;
    String password;
    String nickname;
    String tel;
    String email;
    public  User(){}

    public User(String username, String password, String nickname, String tel, String email) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.tel = tel;
        this.email = email;
    }
//    求两点间中点坐标
    public String getMiddle(double x1,double y1,double x2,double y2){
        String x = String.format("%.1f",(x1+x2)/2);
        String y= String.format("%.1f",(y1+y2)/2);
        return "中点:("+x+","+y+")";
    }
//    生成get/set方法
}
